package com.usian.model.common.dtos;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

@Data
@Slf4j
@ApiModel(description = "装逼")
public class PageRequestDto {

    @ApiModelProperty(value="每页显示条数",required = true)
    protected Integer size=10; //每页显示条数
    @ApiModelProperty(value="当前页",required = true)
    protected Integer page=1;//页码

   public void checkParam() {
       if (this.page == null || this.page < 0) {
           setPage(1);
       }
       if (this.size == null || this.size < 0 || this.size > 100) {
           setSize(10);
       }
   }
}
